.class public Lorg/jboss/netty/buffer/CompositeChannelBuffer;
.super Lorg/jboss/netty/buffer/AbstractChannelBuffer;
.source "CompositeChannelBuffer.java"


# static fields
.field static final synthetic $assertionsDisabled:Z


# instance fields
.field private components:[Lorg/jboss/netty/buffer/ChannelBuffer;

.field private indices:[I

.field private lastAccessedComponentId:I

.field private final order:Ljava/nio/ByteOrder;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 35
    const-class v0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;

    invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    sput-boolean v0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->$assertionsDisabled:Z

    return-void

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public constructor <init>(Ljava/nio/ByteOrder;Ljava/util/List;)V
    .locals 0
    .parameter "endianness"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/nio/ByteOrder;",
            "Ljava/util/List",
            "<",
            "Lorg/jboss/netty/buffer/ChannelBuffer;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 42
    .local p2, buffers:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    invoke-direct {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;-><init>()V

    .line 43
    iput-object p1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order:Ljava/nio/ByteOrder;

    .line 44
    invoke-direct {p0, p2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setComponents(Ljava/util/List;)V

    .line 45
    return-void
.end method

.method private constructor <init>(Lorg/jboss/netty/buffer/CompositeChannelBuffer;)V
    .locals 2
    .parameter "buffer"

    .prologue
    .line 129
    invoke-direct {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;-><init>()V

    .line 130
    iget-object v0, p1, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order:Ljava/nio/ByteOrder;

    iput-object v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order:Ljava/nio/ByteOrder;

    .line 131
    iget-object v0, p1, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    invoke-virtual {v0}, [Lorg/jboss/netty/buffer/ChannelBuffer;->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Lorg/jboss/netty/buffer/ChannelBuffer;

    iput-object v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 132
    iget-object v0, p1, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    invoke-virtual {v0}, [I->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [I

    iput-object v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    .line 133
    invoke-virtual {p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->readerIndex()I

    move-result v0

    invoke-virtual {p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->writerIndex()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setIndex(II)V

    .line 134
    return-void
.end method

.method private componentId(I)I
    .locals 4
    .parameter "index"

    .prologue
    .line 586
    iget v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->lastAccessedComponentId:I

    .line 587
    .local v1, lastComponentId:I
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v1

    if-lt p1, v2, :cond_2

    .line 588
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v1, 0x1

    aget v2, v2, v3

    if-ge p1, v2, :cond_0

    move v0, v1

    .line 604
    :goto_0
    return v0

    .line 593
    :cond_0
    add-int/lit8 v0, v1, 0x1

    .local v0, i:I
    :goto_1
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v2, v2

    if-ge v0, v2, :cond_4

    .line 594
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-ge p1, v2, :cond_1

    .line 595
    iput v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->lastAccessedComponentId:I

    goto :goto_0

    .line 593
    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 601
    .end local v0           #i:I
    :cond_2
    add-int/lit8 v0, v1, -0x1

    .restart local v0       #i:I
    :goto_2
    if-ltz v0, :cond_4

    .line 602
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    if-lt p1, v2, :cond_3

    .line 603
    iput v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->lastAccessedComponentId:I

    goto :goto_0

    .line 601
    :cond_3
    add-int/lit8 v0, v0, -0x1

    goto :goto_2

    .line 609
    :cond_4
    new-instance v2, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v2}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v2
.end method

.method private copyTo(IIILorg/jboss/netty/buffer/ChannelBuffer;)V
    .locals 7
    .parameter "index"
    .parameter "length"
    .parameter "componentId"
    .parameter "dst"

    .prologue
    .line 509
    const/4 v1, 0x0

    .line 510
    .local v1, dstIndex:I
    move v2, p3

    .line 512
    .local v2, i:I
    :goto_0
    if-lez p2, :cond_0

    .line 513
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v4, v5, v2

    .line 514
    .local v4, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v5, v2

    .line 515
    .local v0, adjustment:I
    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int v6, p1, v0

    sub-int/2addr v5, v6

    invoke-static {p2, v5}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 516
    .local v3, localLength:I
    sub-int v5, p1, v0

    invoke-interface {v4, v5, p4, v1, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 517
    add-int/2addr p1, v3

    .line 518
    add-int/2addr v1, v3

    .line 519
    sub-int/2addr p2, v3

    .line 520
    add-int/lit8 v2, v2, 0x1

    .line 521
    goto :goto_0

    .line 523
    .end local v0           #adjustment:I
    .end local v3           #localLength:I
    .end local v4           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_0
    invoke-interface {p4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    invoke-interface {p4, v5}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex(I)V

    .line 524
    return-void
.end method

.method private setComponents(Ljava/util/List;)V
    .locals 7
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lorg/jboss/netty/buffer/ChannelBuffer;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p1, newComponents:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    const/4 v6, 0x0

    .line 98
    sget-boolean v2, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->$assertionsDisabled:Z

    if-nez v2, :cond_0

    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v2

    if-eqz v2, :cond_0

    new-instance v2, Ljava/lang/AssertionError;

    invoke-direct {v2}, Ljava/lang/AssertionError;-><init>()V

    throw v2

    .line 101
    :cond_0
    iput v6, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->lastAccessedComponentId:I

    .line 104
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v2

    new-array v2, v2, [Lorg/jboss/netty/buffer/ChannelBuffer;

    iput-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 105
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v2, v2

    if-ge v1, v2, :cond_4

    .line 106
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 107
    .local v0, c:Lorg/jboss/netty/buffer/ChannelBuffer;
    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v2

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v3

    if-eq v2, v3, :cond_1

    .line 108
    new-instance v2, Ljava/lang/IllegalArgumentException;

    const-string v3, "All buffers must have the same endianness."

    invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v2

    .line 112
    :cond_1
    sget-boolean v2, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->$assertionsDisabled:Z

    if-nez v2, :cond_2

    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v2

    if-eqz v2, :cond_2

    new-instance v2, Ljava/lang/AssertionError;

    invoke-direct {v2}, Ljava/lang/AssertionError;-><init>()V

    throw v2

    .line 113
    :cond_2
    sget-boolean v2, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->$assertionsDisabled:Z

    if-nez v2, :cond_3

    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex()I

    move-result v2

    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v3

    if-eq v2, v3, :cond_3

    new-instance v2, Ljava/lang/AssertionError;

    invoke-direct {v2}, Ljava/lang/AssertionError;-><init>()V

    throw v2

    .line 115
    :cond_3
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aput-object v0, v2, v1

    .line 105
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 119
    .end local v0           #c:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_4
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v2, v2

    add-int/lit8 v2, v2, 0x1

    new-array v2, v2, [I

    iput-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    .line 120
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aput v6, v2, v6

    .line 121
    const/4 v1, 0x1

    :goto_1
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v2, v2

    if-gt v1, v2, :cond_5

    .line 122
    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    iget-object v3, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v4, v1, -0x1

    aget v3, v3, v4

    iget-object v4, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    add-int/lit8 v5, v1, -0x1

    aget-object v4, v4, v5

    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v4

    add-int/2addr v3, v4

    aput v3, v2, v1

    .line 121
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 126
    :cond_5
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v2

    invoke-virtual {p0, v6, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setIndex(II)V

    .line 127
    return-void
.end method


# virtual methods
.method public array()[B
    .locals 1

    .prologue
    .line 153
    new-instance v0, Ljava/lang/UnsupportedOperationException;

    invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V

    throw v0
.end method

.method public arrayOffset()I
    .locals 1

    .prologue
    .line 157
    new-instance v0, Ljava/lang/UnsupportedOperationException;

    invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V

    throw v0
.end method

.method public capacity()I
    .locals 2

    .prologue
    .line 161
    iget-object v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v1, v1

    aget v0, v0, v1

    return v0
.end method

.method public copy(II)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 4
    .parameter "index"
    .parameter "length"

    .prologue
    .line 498
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 499
    .local v0, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v2

    sub-int/2addr v2, p2

    if-le p1, v2, :cond_0

    .line 500
    new-instance v2, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v2}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v2

    .line 503
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->factory()Lorg/jboss/netty/buffer/ChannelBufferFactory;

    move-result-object v2

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v3

    invoke-interface {v2, v3, p2}, Lorg/jboss/netty/buffer/ChannelBufferFactory;->getBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    .line 504
    .local v1, dst:Lorg/jboss/netty/buffer/ChannelBuffer;
    invoke-direct {p0, p1, p2, v0, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->copyTo(IIILorg/jboss/netty/buffer/ChannelBuffer;)V

    .line 505
    return-object v1
.end method

.method public decompose(II)Ljava/util/List;
    .locals 9
    .parameter "index"
    .parameter "length"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II)",
            "Ljava/util/List",
            "<",
            "Lorg/jboss/netty/buffer/ChannelBuffer;",
            ">;"
        }
    .end annotation

    .prologue
    .line 51
    if-nez p2, :cond_1

    .line 52
    invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;

    move-result-object v6

    .line 91
    :cond_0
    return-object v6

    .line 55
    :cond_1
    add-int v7, p1, p2

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v8

    if-le v7, v8, :cond_2

    .line 56
    new-instance v7, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v7}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v7

    .line 59
    :cond_2
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v2

    .line 60
    .local v2, componentId:I
    new-instance v6, Ljava/util/ArrayList;

    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v7, v7

    invoke-direct {v6, v7}, Ljava/util/ArrayList;-><init>(I)V

    .line 63
    .local v6, slice:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v7, v7, v2

    invoke-interface {v7}, Lorg/jboss/netty/buffer/ChannelBuffer;->duplicate()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v3

    .line 64
    .local v3, first:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v7, v7, v2

    sub-int v7, p1, v7

    invoke-interface {v3, v7}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex(I)V

    .line 66
    move-object v0, v3

    .line 67
    .local v0, buf:Lorg/jboss/netty/buffer/ChannelBuffer;
    move v1, p2

    .line 69
    .local v1, bytesToSlice:I
    :cond_3
    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v5

    .line 70
    .local v5, readableBytes:I
    if-gt v1, v5, :cond_4

    .line 72
    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v7

    add-int/2addr v7, v1

    invoke-interface {v0, v7}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex(I)V

    .line 73
    invoke-interface {v6, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 87
    :goto_0
    const/4 v4, 0x0

    .local v4, i:I
    :goto_1
    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    if-ge v4, v7, :cond_0

    .line 88
    invoke-interface {v6, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lorg/jboss/netty/buffer/ChannelBuffer;

    invoke-interface {v7}, Lorg/jboss/netty/buffer/ChannelBuffer;->slice()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v7

    invoke-interface {v6, v4, v7}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 87
    add-int/lit8 v4, v4, 0x1

    goto :goto_1

    .line 77
    .end local v4           #i:I
    :cond_4
    invoke-interface {v6, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 78
    sub-int/2addr v1, v5

    .line 79
    add-int/lit8 v2, v2, 0x1

    .line 82
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v7, v7, v2

    invoke-interface {v7}, Lorg/jboss/netty/buffer/ChannelBuffer;->duplicate()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 84
    if-gtz v1, :cond_3

    goto :goto_0
.end method

.method public discardReadBytes()V
    .locals 9

    .prologue
    const/4 v8, 0x0

    .line 618
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->readerIndex()I

    move-result v4

    .line 619
    .local v4, localReaderIndex:I
    if-nez v4, :cond_0

    .line 661
    :goto_0
    return-void

    .line 622
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->writerIndex()I

    move-result v5

    .line 624
    .local v5, localWriterIndex:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v7

    sub-int v0, v7, v4

    .line 625
    .local v0, bytesToMove:I
    invoke-virtual {p0, v4, v0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->decompose(II)Ljava/util/List;

    move-result-object v1

    .line 630
    .local v1, list:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v7

    invoke-static {v7, v4}, Lorg/jboss/netty/buffer/ChannelBuffers;->buffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    .line 631
    .local v6, padding:Lorg/jboss/netty/buffer/ChannelBuffer;
    invoke-interface {v6, v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex(I)V

    .line 632
    invoke-interface {v1, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 635
    move v2, v4

    .line 637
    .local v2, localMarkedReaderIndex:I
    :try_start_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->resetReaderIndex()V

    .line 638
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->readerIndex()I
    :try_end_0
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_1

    move-result v2

    .line 642
    :goto_1
    move v3, v5

    .line 644
    .local v3, localMarkedWriterIndex:I
    :try_start_1
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->resetWriterIndex()V

    .line 645
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->writerIndex()I
    :try_end_1
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_1 .. :try_end_1} :catch_0

    move-result v3

    .line 650
    :goto_2
    invoke-direct {p0, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setComponents(Ljava/util/List;)V

    .line 653
    sub-int v7, v2, v4

    invoke-static {v7, v8}, Ljava/lang/Math;->max(II)I

    move-result v2

    .line 654
    sub-int v7, v3, v4

    invoke-static {v7, v8}, Ljava/lang/Math;->max(II)I

    move-result v3

    .line 655
    invoke-virtual {p0, v2, v3}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setIndex(II)V

    .line 656
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->markReaderIndex()V

    .line 657
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->markWriterIndex()V

    .line 659
    sub-int v7, v5, v4

    invoke-static {v7, v8}, Ljava/lang/Math;->max(II)I

    move-result v5

    .line 660
    invoke-virtual {p0, v8, v5}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setIndex(II)V

    goto :goto_0

    .line 646
    :catch_0
    move-exception v7

    goto :goto_2

    .line 639
    .end local v3           #localMarkedWriterIndex:I
    :catch_1
    move-exception v7

    goto :goto_1
.end method

.method public duplicate()Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3

    .prologue
    .line 492
    new-instance v0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;

    invoke-direct {v0, p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;-><init>(Lorg/jboss/netty/buffer/CompositeChannelBuffer;)V

    .line 493
    .local v0, duplicate:Lorg/jboss/netty/buffer/ChannelBuffer;
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->readerIndex()I

    move-result v1

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->writerIndex()I

    move-result v2

    invoke-interface {v0, v1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->setIndex(II)V

    .line 494
    return-object v0
.end method

.method public factory()Lorg/jboss/netty/buffer/ChannelBufferFactory;
    .locals 1

    .prologue
    .line 137
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v0

    invoke-static {v0}, Lorg/jboss/netty/buffer/HeapChannelBufferFactory;->getInstance(Ljava/nio/ByteOrder;)Lorg/jboss/netty/buffer/ChannelBufferFactory;

    move-result-object v0

    return-object v0
.end method

.method public getByte(I)B
    .locals 3
    .parameter "index"

    .prologue
    .line 165
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 166
    .local v0, componentId:I
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getByte(I)B

    move-result v1

    return v1
.end method

.method public getBytes(ILjava/nio/channels/GatheringByteChannel;I)I
    .locals 1
    .parameter "index"
    .parameter "out"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 281
    invoke-virtual {p0, p1, p3}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->toByteBuffer(II)Ljava/nio/ByteBuffer;

    move-result-object v0

    invoke-interface {p2, v0}, Ljava/nio/channels/GatheringByteChannel;->write(Ljava/nio/ByteBuffer;)I

    move-result v0

    return v0
.end method

.method public getBytes(ILjava/io/OutputStream;I)V
    .locals 7
    .parameter "index"
    .parameter "out"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 286
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 287
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p3

    if-le p1, v5, :cond_0

    .line 288
    new-instance v5, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v5}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v5

    .line 291
    :cond_0
    move v2, v1

    .line 292
    .local v2, i:I
    :goto_0
    if-lez p3, :cond_1

    .line 293
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v4, v5, v2

    .line 294
    .local v4, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v5, v2

    .line 295
    .local v0, adjustment:I
    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int v6, p1, v0

    sub-int/2addr v5, v6

    invoke-static {p3, v5}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 296
    .local v3, localLength:I
    sub-int v5, p1, v0

    invoke-interface {v4, v5, p2, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getBytes(ILjava/io/OutputStream;I)V

    .line 297
    add-int/2addr p1, v3

    .line 298
    sub-int/2addr p3, v3

    .line 299
    add-int/lit8 v2, v2, 0x1

    .line 300
    goto :goto_0

    .line 301
    .end local v0           #adjustment:I
    .end local v3           #localLength:I
    .end local v4           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_1
    return-void
.end method

.method public getBytes(ILjava/nio/ByteBuffer;)V
    .locals 9
    .parameter "index"
    .parameter "dst"

    .prologue
    .line 233
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 234
    .local v1, componentId:I
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->limit()I

    move-result v4

    .line 235
    .local v4, limit:I
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v3

    .line 236
    .local v3, length:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v7

    sub-int/2addr v7, v3

    if-le p1, v7, :cond_0

    .line 237
    new-instance v7, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v7}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v7

    .line 240
    :cond_0
    move v2, v1

    .line 242
    .local v2, i:I
    :goto_0
    if-lez v3, :cond_1

    .line 243
    :try_start_0
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v6, v7, v2

    .line 244
    .local v6, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v7, v2

    .line 245
    .local v0, adjustment:I
    invoke-interface {v6}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v7

    sub-int v8, p1, v0

    sub-int/2addr v7, v8

    invoke-static {v3, v7}, Ljava/lang/Math;->min(II)I

    move-result v5

    .line 246
    .local v5, localLength:I
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->position()I

    move-result v7

    add-int/2addr v7, v5

    invoke-virtual {p2, v7}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 247
    sub-int v7, p1, v0

    invoke-interface {v6, v7, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getBytes(ILjava/nio/ByteBuffer;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 248
    add-int/2addr p1, v5

    .line 249
    sub-int/2addr v3, v5

    .line 250
    add-int/lit8 v2, v2, 0x1

    .line 251
    goto :goto_0

    .line 253
    .end local v0           #adjustment:I
    .end local v5           #localLength:I
    .end local v6           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :catchall_0
    move-exception v7

    invoke-virtual {p2, v4}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    throw v7

    :cond_1
    invoke-virtual {p2, v4}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 255
    return-void
.end method

.method public getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V
    .locals 7
    .parameter "index"
    .parameter "dst"
    .parameter "dstIndex"
    .parameter "length"

    .prologue
    .line 258
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 259
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p4

    if-gt p1, v5, :cond_0

    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p4

    if-le p3, v5, :cond_1

    .line 260
    :cond_0
    new-instance v5, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v5}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v5

    .line 263
    :cond_1
    move v2, v1

    .line 264
    .local v2, i:I
    :goto_0
    if-lez p4, :cond_2

    .line 265
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v4, v5, v2

    .line 266
    .local v4, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v5, v2

    .line 267
    .local v0, adjustment:I
    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int v6, p1, v0

    sub-int/2addr v5, v6

    invoke-static {p4, v5}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 268
    .local v3, localLength:I
    sub-int v5, p1, v0

    invoke-interface {v4, v5, p2, p3, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 269
    add-int/2addr p1, v3

    .line 270
    add-int/2addr p3, v3

    .line 271
    sub-int/2addr p4, v3

    .line 272
    add-int/lit8 v2, v2, 0x1

    .line 273
    goto :goto_0

    .line 274
    .end local v0           #adjustment:I
    .end local v3           #localLength:I
    .end local v4           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_2
    return-void
.end method

.method public getBytes(I[BII)V
    .locals 7
    .parameter "index"
    .parameter "dst"
    .parameter "dstIndex"
    .parameter "length"

    .prologue
    .line 214
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 215
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p4

    if-gt p1, v5, :cond_0

    array-length v5, p2

    sub-int/2addr v5, p4

    if-le p3, v5, :cond_1

    .line 216
    :cond_0
    new-instance v5, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v5}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v5

    .line 219
    :cond_1
    move v2, v1

    .line 220
    .local v2, i:I
    :goto_0
    if-lez p4, :cond_2

    .line 221
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v4, v5, v2

    .line 222
    .local v4, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v5, v2

    .line 223
    .local v0, adjustment:I
    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int v6, p1, v0

    sub-int/2addr v5, v6

    invoke-static {p4, v5}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 224
    .local v3, localLength:I
    sub-int v5, p1, v0

    invoke-interface {v4, v5, p2, p3, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getBytes(I[BII)V

    .line 225
    add-int/2addr p1, v3

    .line 226
    add-int/2addr p3, v3

    .line 227
    sub-int/2addr p4, v3

    .line 228
    add-int/lit8 v2, v2, 0x1

    .line 229
    goto :goto_0

    .line 230
    .end local v0           #adjustment:I
    .end local v3           #localLength:I
    .end local v4           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_2
    return-void
.end method

.method public getInt(I)I
    .locals 5
    .parameter "index"

    .prologue
    const v4, 0xffff

    .line 192
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 193
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x4

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 194
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getInt(I)I

    move-result v1

    .line 198
    :goto_0
    return v1

    .line 195
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 196
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getShort(I)S

    move-result v1

    and-int/2addr v1, v4

    shl-int/lit8 v1, v1, 0x10

    add-int/lit8 v2, p1, 0x2

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getShort(I)S

    move-result v2

    and-int/2addr v2, v4

    or-int/2addr v1, v2

    goto :goto_0

    .line 198
    :cond_1
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getShort(I)S

    move-result v1

    and-int/2addr v1, v4

    add-int/lit8 v2, p1, 0x2

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getShort(I)S

    move-result v2

    and-int/2addr v2, v4

    shl-int/lit8 v2, v2, 0x10

    or-int/2addr v1, v2

    goto :goto_0
.end method

.method public getLong(I)J
    .locals 8
    .parameter "index"

    .prologue
    const/16 v7, 0x20

    const-wide v5, 0xffffffffL

    .line 203
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 204
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x8

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 205
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getLong(I)J

    move-result-wide v1

    .line 209
    :goto_0
    return-wide v1

    .line 206
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 207
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getInt(I)I

    move-result v1

    int-to-long v1, v1

    and-long/2addr v1, v5

    shl-long/2addr v1, v7

    add-int/lit8 v3, p1, 0x4

    invoke-virtual {p0, v3}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getInt(I)I

    move-result v3

    int-to-long v3, v3

    and-long/2addr v3, v5

    or-long/2addr v1, v3

    goto :goto_0

    .line 209
    :cond_1
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getInt(I)I

    move-result v1

    int-to-long v1, v1

    and-long/2addr v1, v5

    add-int/lit8 v3, p1, 0x4

    invoke-virtual {p0, v3}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getInt(I)I

    move-result v3

    int-to-long v3, v3

    and-long/2addr v3, v5

    shl-long/2addr v3, v7

    or-long/2addr v1, v3

    goto :goto_0
.end method

.method public getShort(I)S
    .locals 4
    .parameter "index"

    .prologue
    .line 170
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 171
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x2

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 172
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getShort(I)S

    move-result v1

    .line 176
    :goto_0
    return v1

    .line 173
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 174
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getByte(I)B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    shl-int/lit8 v1, v1, 0x8

    add-int/lit8 v2, p1, 0x1

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getByte(I)B

    move-result v2

    and-int/lit16 v2, v2, 0xff

    or-int/2addr v1, v2

    int-to-short v1, v1

    goto :goto_0

    .line 176
    :cond_1
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getByte(I)B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    add-int/lit8 v2, p1, 0x1

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getByte(I)B

    move-result v2

    and-int/lit16 v2, v2, 0xff

    shl-int/lit8 v2, v2, 0x8

    or-int/2addr v1, v2

    int-to-short v1, v1

    goto :goto_0
.end method

.method public getUnsignedMedium(I)I
    .locals 5
    .parameter "index"

    .prologue
    const v4, 0xffff

    .line 181
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 182
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x3

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 183
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedMedium(I)I

    move-result v1

    .line 187
    :goto_0
    return v1

    .line 184
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 185
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getShort(I)S

    move-result v1

    and-int/2addr v1, v4

    shl-int/lit8 v1, v1, 0x8

    add-int/lit8 v2, p1, 0x2

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getByte(I)B

    move-result v2

    and-int/lit16 v2, v2, 0xff

    or-int/2addr v1, v2

    goto :goto_0

    .line 187
    :cond_1
    invoke-virtual {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getShort(I)S

    move-result v1

    and-int/2addr v1, v4

    add-int/lit8 v2, p1, 0x2

    invoke-virtual {p0, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->getByte(I)B

    move-result v2

    and-int/lit16 v2, v2, 0xff

    shl-int/lit8 v2, v2, 0x10

    or-int/2addr v1, v2

    goto :goto_0
.end method

.method public hasArray()Z
    .locals 1

    .prologue
    .line 149
    const/4 v0, 0x0

    return v0
.end method

.method public isDirect()Z
    .locals 1

    .prologue
    .line 145
    const/4 v0, 0x0

    return v0
.end method

.method public order()Ljava/nio/ByteOrder;
    .locals 1

    .prologue
    .line 141
    iget-object v0, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order:Ljava/nio/ByteOrder;

    return-object v0
.end method

.method public setByte(II)V
    .locals 3
    .parameter "index"
    .parameter "value"

    .prologue
    .line 304
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 305
    .local v0, componentId:I
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->setByte(II)V

    .line 306
    return-void
.end method

.method public setBytes(ILjava/io/InputStream;I)I
    .locals 9
    .parameter "index"
    .parameter "in"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 425
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 426
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v7

    sub-int/2addr v7, p3

    if-le p1, v7, :cond_0

    .line 427
    new-instance v7, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v7}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v7

    .line 430
    :cond_0
    move v2, v1

    .line 431
    .local v2, i:I
    const/4 v5, 0x0

    .line 434
    .local v5, readBytes:I
    :cond_1
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v6, v7, v2

    .line 435
    .local v6, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v7, v2

    .line 436
    .local v0, adjustment:I
    invoke-interface {v6}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v7

    sub-int v8, p1, v0

    sub-int/2addr v7, v8

    invoke-static {p3, v7}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 437
    .local v3, localLength:I
    sub-int v7, p1, v0

    invoke-interface {v6, v7, p2, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->setBytes(ILjava/io/InputStream;I)I

    move-result v4

    .line 438
    .local v4, localReadBytes:I
    if-gez v4, :cond_2

    .line 439
    if-nez v5, :cond_3

    .line 440
    const/4 v7, -0x1

    .line 458
    :goto_0
    return v7

    .line 446
    :cond_2
    if-ne v4, v3, :cond_4

    .line 447
    add-int/2addr p1, v3

    .line 448
    sub-int/2addr p3, v3

    .line 449
    add-int/2addr v5, v3

    .line 450
    add-int/lit8 v2, v2, 0x1

    .line 456
    :goto_1
    if-gtz p3, :cond_1

    :cond_3
    move v7, v5

    .line 458
    goto :goto_0

    .line 452
    :cond_4
    add-int/2addr p1, v4

    .line 453
    sub-int/2addr p3, v4

    .line 454
    add-int/2addr v5, v4

    goto :goto_1
.end method

.method public setBytes(ILjava/nio/channels/ScatteringByteChannel;I)I
    .locals 9
    .parameter "index"
    .parameter "in"
    .parameter "length"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 463
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 464
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v7

    sub-int/2addr v7, p3

    if-le p1, v7, :cond_0

    .line 465
    new-instance v7, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v7}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v7

    .line 468
    :cond_0
    move v2, v1

    .line 469
    .local v2, i:I
    const/4 v5, 0x0

    .line 471
    .local v5, readBytes:I
    :cond_1
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v6, v7, v2

    .line 472
    .local v6, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v7, v2

    .line 473
    .local v0, adjustment:I
    invoke-interface {v6}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v7

    sub-int v8, p1, v0

    sub-int/2addr v7, v8

    invoke-static {p3, v7}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 474
    .local v3, localLength:I
    sub-int v7, p1, v0

    invoke-interface {v6, v7, p2, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->setBytes(ILjava/nio/channels/ScatteringByteChannel;I)I

    move-result v4

    .line 476
    .local v4, localReadBytes:I
    if-ne v4, v3, :cond_2

    .line 477
    add-int/2addr p1, v3

    .line 478
    sub-int/2addr p3, v3

    .line 479
    add-int/2addr v5, v3

    .line 480
    add-int/lit8 v2, v2, 0x1

    .line 486
    :goto_0
    if-gtz p3, :cond_1

    .line 488
    return v5

    .line 482
    :cond_2
    add-int/2addr p1, v4

    .line 483
    sub-int/2addr p3, v4

    .line 484
    add-int/2addr v5, v4

    goto :goto_0
.end method

.method public setBytes(ILjava/nio/ByteBuffer;)V
    .locals 9
    .parameter "index"
    .parameter "src"

    .prologue
    .line 380
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 381
    .local v1, componentId:I
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->limit()I

    move-result v4

    .line 382
    .local v4, limit:I
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v3

    .line 383
    .local v3, length:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v7

    sub-int/2addr v7, v3

    if-le p1, v7, :cond_0

    .line 384
    new-instance v7, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v7}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v7

    .line 387
    :cond_0
    move v2, v1

    .line 389
    .local v2, i:I
    :goto_0
    if-lez v3, :cond_1

    .line 390
    :try_start_0
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v6, v7, v2

    .line 391
    .local v6, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v7, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v7, v2

    .line 392
    .local v0, adjustment:I
    invoke-interface {v6}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v7

    sub-int v8, p1, v0

    sub-int/2addr v7, v8

    invoke-static {v3, v7}, Ljava/lang/Math;->min(II)I

    move-result v5

    .line 393
    .local v5, localLength:I
    invoke-virtual {p2}, Ljava/nio/ByteBuffer;->position()I

    move-result v7

    add-int/2addr v7, v5

    invoke-virtual {p2, v7}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 394
    sub-int v7, p1, v0

    invoke-interface {v6, v7, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->setBytes(ILjava/nio/ByteBuffer;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 395
    add-int/2addr p1, v5

    .line 396
    sub-int/2addr v3, v5

    .line 397
    add-int/lit8 v2, v2, 0x1

    .line 398
    goto :goto_0

    .line 400
    .end local v0           #adjustment:I
    .end local v5           #localLength:I
    .end local v6           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :catchall_0
    move-exception v7

    invoke-virtual {p2, v4}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    throw v7

    :cond_1
    invoke-virtual {p2, v4}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 402
    return-void
.end method

.method public setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V
    .locals 7
    .parameter "index"
    .parameter "src"
    .parameter "srcIndex"
    .parameter "length"

    .prologue
    .line 405
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 406
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p4

    if-gt p1, v5, :cond_0

    invoke-interface {p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p4

    if-le p3, v5, :cond_1

    .line 407
    :cond_0
    new-instance v5, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v5}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v5

    .line 410
    :cond_1
    move v2, v1

    .line 411
    .local v2, i:I
    :goto_0
    if-lez p4, :cond_2

    .line 412
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v4, v5, v2

    .line 413
    .local v4, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v5, v2

    .line 414
    .local v0, adjustment:I
    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int v6, p1, v0

    sub-int/2addr v5, v6

    invoke-static {p4, v5}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 415
    .local v3, localLength:I
    sub-int v5, p1, v0

    invoke-interface {v4, v5, p2, p3, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->setBytes(ILorg/jboss/netty/buffer/ChannelBuffer;II)V

    .line 416
    add-int/2addr p1, v3

    .line 417
    add-int/2addr p3, v3

    .line 418
    sub-int/2addr p4, v3

    .line 419
    add-int/lit8 v2, v2, 0x1

    .line 420
    goto :goto_0

    .line 421
    .end local v0           #adjustment:I
    .end local v3           #localLength:I
    .end local v4           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_2
    return-void
.end method

.method public setBytes(I[BII)V
    .locals 7
    .parameter "index"
    .parameter "src"
    .parameter "srcIndex"
    .parameter "length"

    .prologue
    .line 361
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v1

    .line 362
    .local v1, componentId:I
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v5

    sub-int/2addr v5, p4

    if-gt p1, v5, :cond_0

    array-length v5, p2

    sub-int/2addr v5, p4

    if-le p3, v5, :cond_1

    .line 363
    :cond_0
    new-instance v5, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v5}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v5

    .line 366
    :cond_1
    move v2, v1

    .line 367
    .local v2, i:I
    :goto_0
    if-lez p4, :cond_2

    .line 368
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v4, v5, v2

    .line 369
    .local v4, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v5, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v5, v2

    .line 370
    .local v0, adjustment:I
    invoke-interface {v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v5

    sub-int v6, p1, v0

    sub-int/2addr v5, v6

    invoke-static {p4, v5}, Ljava/lang/Math;->min(II)I

    move-result v3

    .line 371
    .local v3, localLength:I
    sub-int v5, p1, v0

    invoke-interface {v4, v5, p2, p3, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->setBytes(I[BII)V

    .line 372
    add-int/2addr p1, v3

    .line 373
    add-int/2addr p3, v3

    .line 374
    sub-int/2addr p4, v3

    .line 375
    add-int/lit8 v2, v2, 0x1

    .line 376
    goto :goto_0

    .line 377
    .end local v0           #adjustment:I
    .end local v3           #localLength:I
    .end local v4           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_2
    return-void
.end method

.method public setInt(II)V
    .locals 4
    .parameter "index"
    .parameter "value"

    .prologue
    .line 335
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 336
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x4

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 337
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->setInt(II)V

    .line 345
    :goto_0
    return-void

    .line 338
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 339
    ushr-int/lit8 v1, p2, 0x10

    int-to-short v1, v1

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setShort(II)V

    .line 340
    add-int/lit8 v1, p1, 0x2

    int-to-short v2, p2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setShort(II)V

    goto :goto_0

    .line 342
    :cond_1
    int-to-short v1, p2

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setShort(II)V

    .line 343
    add-int/lit8 v1, p1, 0x2

    ushr-int/lit8 v2, p2, 0x10

    int-to-short v2, v2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setShort(II)V

    goto :goto_0
.end method

.method public setLong(IJ)V
    .locals 5
    .parameter "index"
    .parameter "value"

    .prologue
    const/16 v4, 0x20

    .line 348
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 349
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x8

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 350
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffer;->setLong(IJ)V

    .line 358
    :goto_0
    return-void

    .line 351
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 352
    ushr-long v1, p2, v4

    long-to-int v1, v1

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setInt(II)V

    .line 353
    add-int/lit8 v1, p1, 0x4

    long-to-int v2, p2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setInt(II)V

    goto :goto_0

    .line 355
    :cond_1
    long-to-int v1, p2

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setInt(II)V

    .line 356
    add-int/lit8 v1, p1, 0x4

    ushr-long v2, p2, v4

    long-to-int v2, v2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setInt(II)V

    goto :goto_0
.end method

.method public setMedium(II)V
    .locals 4
    .parameter "index"
    .parameter "value"

    .prologue
    .line 322
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 323
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x3

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 324
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->setMedium(II)V

    .line 332
    :goto_0
    return-void

    .line 325
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 326
    shr-int/lit8 v1, p2, 0x8

    int-to-short v1, v1

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setShort(II)V

    .line 327
    add-int/lit8 v1, p1, 0x2

    int-to-byte v2, p2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setByte(II)V

    goto :goto_0

    .line 329
    :cond_1
    int-to-short v1, p2

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setShort(II)V

    .line 330
    add-int/lit8 v1, p1, 0x2

    ushr-int/lit8 v2, p2, 0x10

    int-to-byte v2, v2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setByte(II)V

    goto :goto_0
.end method

.method public setShort(II)V
    .locals 4
    .parameter "index"
    .parameter "value"

    .prologue
    .line 309
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v0

    .line 310
    .local v0, componentId:I
    add-int/lit8 v1, p1, 0x2

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    add-int/lit8 v3, v0, 0x1

    aget v2, v2, v3

    if-gt v1, v2, :cond_0

    .line 311
    iget-object v1, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v1, v1, v0

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v2, v2, v0

    sub-int v2, p1, v2

    invoke-interface {v1, v2, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->setShort(II)V

    .line 319
    :goto_0
    return-void

    .line 312
    :cond_0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v1

    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v1, v2, :cond_1

    .line 313
    ushr-int/lit8 v1, p2, 0x8

    int-to-byte v1, v1

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setByte(II)V

    .line 314
    add-int/lit8 v1, p1, 0x1

    int-to-byte v2, p2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setByte(II)V

    goto :goto_0

    .line 316
    :cond_1
    int-to-byte v1, p2

    invoke-virtual {p0, p1, v1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setByte(II)V

    .line 317
    add-int/lit8 v1, p1, 0x1

    ushr-int/lit8 v2, p2, 0x8

    int-to-byte v2, v2

    invoke-virtual {p0, v1, v2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->setByte(II)V

    goto :goto_0
.end method

.method public slice(II)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "index"
    .parameter "length"

    .prologue
    .line 527
    if-nez p1, :cond_0

    .line 528
    if-nez p2, :cond_3

    .line 529
    sget-object v1, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 544
    :goto_0
    return-object v1

    .line 531
    :cond_0
    if-ltz p1, :cond_1

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v1

    sub-int/2addr v1, p2

    if-le p1, v1, :cond_2

    .line 532
    :cond_1
    new-instance v1, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v1

    .line 533
    :cond_2
    if-nez p2, :cond_3

    .line 534
    sget-object v1, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 537
    :cond_3
    invoke-virtual {p0, p1, p2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->decompose(II)Ljava/util/List;

    move-result-object v0

    .line 538
    .local v0, components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 544
    new-instance v1, Lorg/jboss/netty/buffer/CompositeChannelBuffer;

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v2

    invoke-direct {v1, v2, v0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;-><init>(Ljava/nio/ByteOrder;Ljava/util/List;)V

    goto :goto_0

    .line 540
    :pswitch_0
    sget-object v1, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 542
    :pswitch_1
    const/4 v1, 0x0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 538
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public toByteBuffer(II)Ljava/nio/ByteBuffer;
    .locals 8
    .parameter "index"
    .parameter "length"

    .prologue
    .line 549
    iget-object v6, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v6, v6

    const/4 v7, 0x1

    if-ne v6, v7, :cond_0

    .line 550
    iget-object v6, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    const/4 v7, 0x0

    aget-object v6, v6, v7

    invoke-interface {v6, p1, p2}, Lorg/jboss/netty/buffer/ChannelBuffer;->toByteBuffer(II)Ljava/nio/ByteBuffer;

    move-result-object v5

    .line 559
    :goto_0
    return-object v5

    .line 553
    :cond_0
    invoke-virtual {p0, p1, p2}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->toByteBuffers(II)[Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 554
    .local v2, buffers:[Ljava/nio/ByteBuffer;
    invoke-static {p2}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v6

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    move-result-object v5

    .line 555
    .local v5, merged:Ljava/nio/ByteBuffer;
    move-object v0, v2

    .local v0, arr$:[Ljava/nio/ByteBuffer;
    array-length v4, v0

    .local v4, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_1
    if-ge v3, v4, :cond_1

    aget-object v1, v0, v3

    .line 556
    .local v1, b:Ljava/nio/ByteBuffer;
    invoke-virtual {v5, v1}, Ljava/nio/ByteBuffer;->put(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;

    .line 555
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 558
    .end local v1           #b:Ljava/nio/ByteBuffer;
    :cond_1
    invoke-virtual {v5}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;

    goto :goto_0
.end method

.method public toByteBuffers(II)[Ljava/nio/ByteBuffer;
    .locals 8
    .parameter "index"
    .parameter "length"

    .prologue
    .line 564
    invoke-direct {p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->componentId(I)I

    move-result v2

    .line 565
    .local v2, componentId:I
    add-int v6, p1, p2

    invoke-virtual {p0}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->capacity()I

    move-result v7

    if-le v6, v7, :cond_0

    .line 566
    new-instance v6, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v6}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v6

    .line 569
    :cond_0
    new-instance v1, Ljava/util/ArrayList;

    iget-object v6, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v6, v6

    invoke-direct {v1, v6}, Ljava/util/ArrayList;-><init>(I)V

    .line 571
    .local v1, buffers:Ljava/util/List;,"Ljava/util/List<Ljava/nio/ByteBuffer;>;"
    move v3, v2

    .line 572
    .local v3, i:I
    :goto_0
    if-lez p2, :cond_1

    .line 573
    iget-object v6, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    aget-object v5, v6, v3

    .line 574
    .local v5, s:Lorg/jboss/netty/buffer/ChannelBuffer;
    iget-object v6, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->indices:[I

    aget v0, v6, v3

    .line 575
    .local v0, adjustment:I
    invoke-interface {v5}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v6

    sub-int v7, p1, v0

    sub-int/2addr v6, v7

    invoke-static {p2, v6}, Ljava/lang/Math;->min(II)I

    move-result v4

    .line 576
    .local v4, localLength:I
    sub-int v6, p1, v0

    invoke-interface {v5, v6, v4}, Lorg/jboss/netty/buffer/ChannelBuffer;->toByteBuffer(II)Ljava/nio/ByteBuffer;

    move-result-object v6

    invoke-interface {v1, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 577
    add-int/2addr p1, v4

    .line 578
    sub-int/2addr p2, v4

    .line 579
    add-int/lit8 v3, v3, 0x1

    .line 580
    goto :goto_0

    .line 582
    .end local v0           #adjustment:I
    .end local v4           #localLength:I
    .end local v5           #s:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_1
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v6

    new-array v6, v6, [Ljava/nio/ByteBuffer;

    invoke-interface {v1, v6}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v6

    check-cast v6, [Ljava/nio/ByteBuffer;

    return-object v6
.end method

.method public toString()Ljava/lang/String;
    .locals 3

    .prologue
    .line 665
    invoke-super {p0}, Lorg/jboss/netty/buffer/AbstractChannelBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    .line 666
    .local v0, result:Ljava/lang/String;
    const/4 v1, 0x0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    .line 667
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", components="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->components:[Lorg/jboss/netty/buffer/ChannelBuffer;

    array-length v2, v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ")"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method
